-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Define size
for SVD
#28439
Define size
for SVD
#28439
Conversation
Closes JuliaLang#28438. And first PR!
Welcome to Julia! Given @fredrikekre's comment in the linked issue, is this pull request still relevant? If so, it would be great if you could add a test. |
My motivation for this PR was: julia> using LinearAlgebra
julia> ldiv!(zeros(3), svd(rand(3,3)), rand(3))
ERROR: MethodError: no method matching size(::SVD{Float64,Float64,Array{Float64,2}}, ::Int64)
Closest candidates are:
size(::Any, ::Integer, ::Integer) at deprecated.jl:53
size(::Any, ::Integer, ::Integer, ::Integer...) at deprecated.jl:53
size(::BitArray{1}, ::Any) at bitarray.jl:74
...
Stacktrace:
[1] ldiv!(::Array{Float64,1}, ::SVD{Float64,Float64,Array{Float64,2}}, ::Array{Float64,1}) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v0.7\LinearAlgebra\src\factorization.jl:101
[2] top-level scope at none:0 The above works after defining |
One of the linear algebra folks will have to comment if this makes sense, but it would be good to add the motivating failure as a test case. |
This is right. For factorizations, It looks like there is some whitespace somewhere in the diff which is causing the tests to fail. |
stdlib/LinearAlgebra/test/svd.jl
Outdated
@@ -29,6 +29,8 @@ using LinearAlgebra: BlasComplex, BlasFloat, BlasReal, QRPivoted | |||
# matrices from the factorization as expected. | |||
@test sf1.U*Diagonal(sf1.S)*sf1.Vt' ≊ m1 | |||
@test sf2.U*Diagonal(sf2.S)*sf2.Vt' ≊ m2 | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The indentation here is making CI fail, as it is superfluous. Extra white spaces are not allowed as they make diffs harder to read.
Should this be included in 0.7? |
Yes, I've added the backport label. |
Closes #28438. And first PR!